<?php  session_start();
	include('../controller/functions.php');
	User::connection();

$strErrorMessages="";
$strFileName= $_REQUEST["txtFile"];

$strAction= $_REQUEST["txtAction"];

if ($strAction== "DEL")
{
// check to see if file exists
  // if so, erase it 
  $strTemp= $strFileName;
  if (file_exists($strTemp))
  {
  	  echo "Image Deleted!";
	  echo "<meta http-equiv=Refresh content=4;url=../ListImages.php>";
	}
	else {
    echo "The image $strTemp does not exist";
}
	
/*	Redirect("ListImages.php");*/
  
/*$strErrorMessages="Could not delete file";*/

}

@unlink ("$strTemp");

print "<HTML><HEAD>";
/*include ("../../../Includes/Styles.php");*/
print "
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
<link rel='shortcut icon' href='../images/fav.ico'>
<link rel='icon' type='image/gif' href='../images/fav.ico'>
<title>Forum | Create Topic</title>
";


print "</HEAD><BODY>";
print "<TITLE>File Management</TITLE>";

print "<TABLE border=0 bordercolor='#4981CE'>";
print "<TR><TD WIDTH=15% VALIGN=TOP>";
/*include_once ("../../../navigation.php");*/
print "</TD></TR>";

print "<TR><TD>$strErrorMessages<BR>";
print "<A HREF=\"../ListImages.php\"> Back to List</A>";
print "</TD></TR>";
print "</TABLE>";

print "</BODY></HTML>";
?>
